//获取应用实例
var app = getApp();
Page({
    data: {
        user_info: {}
    },
    onLoad() {

    },
    onShow() {
        let that = this;
        // that.setData({
        //     user_info: {
        //         nickname: "八仔社区",
        //         avatar_url: "/images/more/logo.png"
        //     },
        // })
        this.getInfo();
    },
    getInfo: function () {
        const that = this;
        wx.request({
            url: app.buildUrl("/member/info"),
            header: app.getRequestHeader(),
            success: function (res) {
                const resp = res.data;
                if (resp.code !== 200) {
                    app.alert({'content': resp.msg});
                    return;
                }
                that.setData({
                    user_info: resp.data.info
                })
            }
        })
    }
});